home *** CD-ROM | disk | FTP | other *** search
/ Software USA 3 #11 / Software USA Volume 3.11.iso / mac / Games / World Builder / Documentation / Writing Adventure Games / Writing Adventures, Pt.2 < prev   
Text File  |  1995-11-28  |  15KB  |  260 lines

  1.  
  2.  
  3. Writing Adventure Games, Part Two
  4.          by Ray Dunakin
  5.  
  6. Revised 11/28/95
  7.  
  8. In this article I want to share some of the things I've learned about creating successful shareware adventure games. Some of these things I've learned from countless hours of watching people play-testing my games. Other things I've learned from talking to people online, or from the letters I've received from gamers around the world. And some is just personal observation.
  9.  
  10. Common Commands
  11.  
  12. I've noticed that a lot of shareware adventures suffer from variations in the commands that the player uses to play the game. Commands should be consistent not only within an individual game, but should also be consistent with the commands used in similar adventure games. This is especially true of World Builder games, where there is already a basic similarity of form and function. 
  13.  
  14. Although this may not apply to every possible game, in most cases certain command conventions should be adhered to. Otherwise you risk confusing and frustrating your players. 
  15.  
  16. For instance, in my early games I tried using the word "INFO" as a command for talking to non-player characters. But during testing I found that most players would enter the word "TALK" when they wanted to talk to another character. This happened even when I had instructions at the beginning of the game informing people of the "INFO" command. People either overlooked it, or forgot it. And since you are trying to talk to a character, "TALK" was the command people naturally attempted. 
  17.  
  18. In some games I've reviewed, the author has used keywords to trigger interaction between characters. The idea behind this is that the player will try to find out about certain plot elements, and will use those words. For instance, if the player has been told about a wizard who has something the player needs, the author expects the player to enter something like, "Ask about wizard" when he meets a bartender or other character. So the code is programmed to respond to the word "wizard."
  19.  
  20. The trouble with this is, the player often doesn't enter the right word or words. Perhaps the player doesn't know that this is how the conversation is supposed to be initiated. Or maybe the player asks for information using a different word or variation of the correct word. And again, in my experience the average player usually will enter something more like, "Talk to bartender." 
  21.  
  22. So obviously "TALK" should be the standard command for initiating conversations, at least in World Builder games. If you wish, you can also include alternate words, such as INFO or ASK, all in the same line of code. Here's an example of a conversation in World Builder, taken from my game, "A Mess O'Trouble":
  23.  
  24. IF{TEXT$=TALK}OR{TEXT$=INFO}OR{TEXT$=HELLO}OR{TEXT$=ASK}THEN
  25.     PRINT{.........................................}
  26.     IF{W8#<1}THEN
  27.         PRINT{USUR: "There is a magic sludgepit to the WEST. The elves have been dumping old magic potions, brews and elexirs there for centuries."}
  28.         PRINT{"In fact, this enchanted forest is the result of contamination from all that magic toxic waste!"}
  29.         LET{W8#=1}
  30.     EXIT
  31.     IF{W8#=1}THEN
  32.         PRINT{USUR: "In the Old Days, the elves used magic pellets to power many of their wondrous devices. But now even the elves don't remember how to make them."}
  33.         PRINT{"There are only a few left. I've got some, just a few that I've picked up in the forest over the years. About two bags full."}
  34.         LET{W8#=2}
  35.     EXIT
  36.     IF{W8#=2}THEN
  37.         PRINT{USUR: "You should always say the magic word when you see the symbol of a rocket."}
  38.         LET{W8#=3}
  39.     EXIT
  40.     IF{W8#=3}THEN
  41.         PRINT{USUR: "My cousin Smokey spent the winter with me last year and I darn near froze to death! Everytime I'd start a fire in the fireplace the idiot would pour water on it!"}
  42.         LET{W8#=4}
  43.     EXIT
  44.     IF{HAKO.BUTTON>STORAGE@}THEN
  45.         PRINT{USUR: "Well, I'm not supposed to tell you this, but there are 40 Maximum-Value Objects, not including the bonus items."}
  46.     EXIT
  47.     IF{HAKO.DOOR>STORAGE@}THEN
  48.         PRINT{USUR: "Here's a joke: What do you call a female tractor? A cowdozer!"}
  49.     EXIT
  50.     PRINT{USUR: "Sorry friend, I haven't heard anything new."}
  51. EXIT
  52.  
  53. In this example the player can "talk" to the character (a bear named Usur) several times, and get more information. The variable W8 is used to keep track of which responses have already been given. Each time a response is given, the variable is updated. When the character can't give any additional information, a default response is printed: "Sorry friend, I haven't heard anything new." 
  54.  
  55. A pair of additional IF/THEN statements allow for special responses later in the game. 
  56.  
  57. Notice too that the character speaking is always identified, and his comments are always in quotation marks. This makes it easier for the player to tell that he has been spoken to, and by whom. This is a standard that I highly recommend. 
  58. ----------------------------------------------
  59.  
  60. Using Objects
  61.  
  62. Here is another place where standardization is sorely needed. I've played games where the command needed to use an object is DROP, hardly the verb that most players would think of first! Other games, including my first game, tend to have different action verbs for different objects. This also leads to confusion for the player. 
  63.  
  64. The simplest verb for handling actions is USE, and should be standard from game to game. And it allows you to program slightly more complex actions, where the player can USE one object with another. Here's an example:
  65.  
  66. IF{TEXT$=USE}OR{TEXT$=INSERT}OR{TEXT$=PUT}THEN
  67.     PRINT{........................................}
  68.     IF{TEXT$=MAGNET}THEN
  69.         IF{MAGNET>PLAYER@}THEN
  70.             PRINT{You don't have a magnet.}
  71.         EXIT
  72.         IF{M6#<1}THEN
  73.             PRINT{The electromagnet isn't powered.}
  74.         EXIT
  75.         IF{TEXT$=POT}OR{TEXT$=PLANT}OR{TEXT$=CAN}THEN
  76.             SOUND{CLINK}
  77.             SOUND{SLIDE.2}
  78.             MOVE{POT.1}TO{STORAGE@}
  79.             MOVE{POT.2}TO{STORAGE@}
  80.             MOVE{POT.3}TO{STORAGE@}
  81.             MOVE{POT.4}TO{STORAGE@}
  82.             MOVE{POT.5}TO{STORAGE@}
  83.             SOUND{PISTOL-COCKING.1}
  84.             MOVE{POT.6}TO{STORAGE@}
  85.             SOUND{PHAZE}
  86.             MOVE{GWDOOR.OPEN}TO{SCENE@}
  87.             PRINT{By putting the magnet against the glass, you drag the metal pot across the glass until it flips the switch, causing the glass door to open.}
  88.         EXIT
  89.         IF{TEXT$=SOCKET}OR{TEXT$=HOLE}OR{TEXT$=INSERT}THEN
  90.             PRINT{The magnet doesn't fit in the socket.}
  91.         EXIT
  92.         IF{TEXT$=LEVER}THEN
  93.             PRINT{The lever is unaffected by the magnet.}
  94.         EXIT
  95.         IF{TEXT$=WHEEL}THEN
  96.             PRINT{The wheel is on the far wall, too far away for the magnet to have any effect on it.}
  97.         EXIT
  98.         IF{TEXT$=DOOR}THEN
  99.             IF{GWDOOR.OPEN>SCENE@}THEN
  100.                 PRINT{The glassy door is unaffected by the magnet.}
  101.             EXIT
  102.             PRINT{The door on the far wall is unaffected by the magnet.}
  103.         EXIT
  104.         PRINT{What do you want to use the magnet with?}
  105.     EXIT
  106.     IF{TEXT$=FORK}THEN
  107.         IF{FORK=PLAYER@}THEN
  108.             IF{GWDOOR.OPEN=SCENE@}THEN
  109.                 MOVE{FORK}TO{STORAGE@}
  110.                 MOVE{GFORK.1}TO{SCENE@}
  111.                 SOUND{SNIP.2}
  112.                 PRINT{The fork fits the socket perfectly, and becomes locked in place.}
  113.             EXIT
  114.             PRINT{The fork looks like it might fit the socket, but you can't reach the socket with the glass door closed.}
  115.         EXIT
  116.         PRINT{You don't have a fork.}
  117.     EXIT
  118.     IF{TEXT$=INSERT}THEN
  119.         PRINT{That doesn't fit in the socket.}
  120.     EXIT
  121. END
  122.  
  123. This is a fairly complex example. There are several possible actions and variations that the player might try, and for every one of them there is an appropriate response. 
  124.  
  125. The scene shows a room divided by an unbreakable glass wall. There is a glass door in the wall. On the other side of the glass, in the far wall, is another door, and beside it is a socket. On the floor near the glass is a lever, and a potted plant. The pot is made of iron or steel. To solve the puzzle, the player must use an electromagnet (taken from a nearby scene) to move the potted plant, tripping the lever which opens the glass door. Then the player must use a Data Fork in the socket, to open the inner door. For simplicity, the Data Fork object is just named "fork".
  126.  
  127. If the player enters USE and MAGNET, then the code checks to see if the player has the magnet. If he does, then the code checks to see if the player has specified what he wants to use the magnet with. If the player has entered either POT, PLANT or CAN, then the program performs the required action. If the player has entered the name of one of the other objects in the scene, then a response is printed telling the player that the magnet doesn't work with that particular object. If the player has only entered USE MAGNET, then the player is asked to be more specific: "What do you want to use the magnet with?" 
  128.  
  129. Because some players might enter something like "PUT THE FORK IN THE SOCKET" or "INSERT THE FORK IN THE SOCKET," I've included the verbs PUT and INSERT as alternatives to USE. 
  130.  
  131. Also, in my Global Code I have a default response for the verb USE. This response is printed any time the player attempts to use something unusual to solve a puzzle. For instance, if the player enters "USE SCREWDRIVER WITH SOCKET" the default response comes up: "That doesn't seem to work." This reduces the amount of code needed in each scene. 
  132.  
  133.  
  134. Default Responses
  135. This brings up another point: Every common command used in the game should have some kind of default response to handle the times when the player tries to do something you didn't think of! Sure, World Builder has a default response "hard-wired" into it, but reading "Huh?" everytime you try to do something turns players off. In most cases there should be a response that tells the player that he can't do what he is attempting, or gives a reason why he can't do it. 
  136.  
  137. Here are some of the Global default responses I use:
  138.  
  139. IF{TEXT$=WRITE}OR{TEXT$=DRAW}THEN
  140.     PRINT{You don't have a pen or pencil.}
  141. EXIT
  142. IF{TEXT$=THANKS}OR{TEXT$=THANK YOU}THEN
  143.     PRINT{"You're welcome!"}
  144. EXIT
  145. IF{TEXT$=HAKO}THEN
  146.     PRINT{Nothing happens.}
  147. EXIT
  148. IF{TEXT$=TURN}OR{TEXT$=TWIST}THEN
  149.     PRINT{You can't turn that.}
  150. EXIT
  151. IF{TEXT$=DIG}THEN
  152.     PRINT{You can't dig here.}
  153. EXIT
  154. IF{TEXT$=MOVE}OR{TEXT$=PUSH}OR{TEXT$=LIFT}OR{TEXT$=PULL}THEN
  155.     PRINT{You can't move that.}
  156. EXIT
  157. IF{TEXT$=SEARCH}THEN
  158.     PRINT{You find nothing unusual.}
  159. EXIT
  160. IF{TEXT$=INSPECT}OR{TEXT$=EXAMINE}THEN
  161.     PRINT{Click on the things you want to examine.}
  162. EXIT
  163. IF{TEXT$=OPEN}THEN
  164.     IF{TEXT$=CAN}THEN
  165.         PRINT{You need to use a can opener.}
  166.     EXIT
  167.     PRINT{You can't open anything here.}
  168. EXIT
  169. IF{TEXT$=CLOSE}THEN
  170.     PRINT{You can't close anything here.}
  171. EXIT
  172. IF{TEXT$=ENTER}THEN
  173.     PRINT{You can't enter anything here.}
  174. EXIT
  175. IF{TEXT$=EXIT}THEN
  176.     PRINT{You can't exit anything here.}
  177. EXIT
  178. IF{TEXT$==UP}OR{TEXT$=CLIMB}THEN
  179.     PRINT{You can't go up here.}
  180. EXIT
  181. IF{TEXT$=DOWN}THEN
  182.     PRINT{You can't go down here.}
  183. EXIT
  184. IF{TEXT$=DRINK}THEN
  185.     PRINT{..................................}
  186.     IF{CANTEEN=PLAYER@}THEN
  187.         IF{W1#>0}THEN
  188.             LET{W1#=W1#-1}
  189.             SOUND{DROWNING.1}
  190.             PRINT{The water in the canteen relieves your thirst.}
  191.             LET{H2#=90}
  192.             IF{W1#=0}THEN
  193.                 PRINT{The canteen is now empty.}
  194.             EXIT
  195.         EXIT
  196.         PRINT{Your canteen is empty.}
  197.     EXIT
  198.     PRINT{Drink what?}
  199. EXIT
  200. IF{TEXT$=EAT}OR{TEXT$=TASTE}THEN
  201.     PRINT{..................................}
  202.     IF{TEXT$=FOOD}THEN
  203.         IF{FOOD=PLAYER@}THEN
  204.             SOUND{CHEWING.1}
  205.             SOUND{BELCH.2}
  206.             PRINT{The food is filling.}
  207.             LET{H1#=95}
  208.             MOVE{FOOD}TO{STORAGE@}
  209.         EXIT
  210.         PRINT{You don't have any food.}
  211.     EXIT
  212.     PRINT{Eat what?}
  213. EXIT
  214. IF{TEXT$=HELP}THEN
  215.     SOUND{SINISTER LAUGH}
  216.     PRINT{RAY: "Surely you jest! You're on your own here."}
  217. EXIT
  218. IF{TEXT$=READ}THEN
  219.     PRINT{..................................}
  220.     IF{TEXT$=MAP}THEN
  221.         IF{MAP=PLAYER@}THEN
  222.             MOVE{MAP.1}TO{SCENE@}
  223.             PRINT{To stop, click on the map.}
  224.         EXIT
  225.         PRINT{You don't have a map.}
  226.     EXIT
  227.     PRINT{Read what?}
  228. EXIT
  229. IF{TEXT$=SHOOT}THEN
  230.     PRINT{You can't shoot that.}
  231. EXIT
  232. IF{TEXT$=KILL SELF}OR{TEXT$=SUICIDE}THEN
  233.     PRINT{You can't get out of this that easily!}
  234. EXIT
  235. IF{TEXT$=HIT}OR{TEXT$=BREAK}THEN
  236.     PRINT{You can't break that.}
  237. EXIT
  238.  
  239. All of these are things that players WILL try to do somewhere in almost every adventure game. All of the commands listed here are used by players often enough that they should be considered standard. And you may need others that apply to specific situations in your game. 
  240.  
  241. Some default responses can be handled better in scene code, especially when it is something that applies only to a specific situation in a scene.
  242.  
  243. Also, although it isn't strictly necessary, I usually like to have a default response for those times when the player gets mad enough to swear at the game, or at a character in the game. 
  244. -------------------------------------------------
  245.  
  246. Standardizing Windows
  247.  
  248. Your scene and text windows should remain the same throughout your game, only changing size and/or shape when absolutely necessary. I've played a lot of games where the windows change size, or move around the screen, almost every time you enter a scene. This looks unprofessional, and is annoying to most players.
  249.  
  250. Also, in World Builder the windows are automatically set so that the text window is shorter than the scene window. This doesn't leave you much room for text, especially in scenes where the player is conversing with another character. To get the most from the text window, stretch it so that it is as tall as the scene window. Also, you can widen it a little too, and make the two windows touch. But don't overlap them! Once you have done this on the first scene, before adding any text or drawings, copy the entire room and then paste it as many times as needed for your game. This will insure that all your scenes are exactly the same size and position.
  251.  
  252. There is another reason for keeping your windows the same throughout the game. If the windows are always the same, it will take less time when the player moves from one scene to another. 
  253.  
  254. Windows in "Ray's World Template"
  255.  
  256. In the special World Template I created, there is one blank scene. The windows in this scene have already been set to the optimum size and position. All you have to do is copy this blank scene and paste in as many copies of it as you need. This way all the windows will be the same throughout the game. If you need one or two scenes with special windows, you can adjust those scenes individually.
  257.  
  258. If you wanted to , you could make a game with larger windows, to take advantage of the larger screens that are common on most Macs these days. Bear in mind that if you do this, your game won't work properly on older Macs and PowerBooks, which have small screens. That would limit the number of downloads and registrations your game receives especially since WB games are ideally suited for use on small screen Macs.
  259.  
  260.